<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="template.xhtml">

	<ui:define name="corpo">

		<!-- start: PAGE HEADER -->
		<div class="row">
			<div class="col-sm-12">

				<!-- start: PAGE TITLE & BREADCRUMB -->
				<ol class="breadcrumb">
					<li><i class="clip-radio-checked"></i> <a href="#"> Cadastra Reserva  </a></li>
				</ol>
				<div class="page-header">
					<h1>
						Cadastra Reserva 
					</h1>
				</div>
				<!-- end: PAGE TITLE & BREADCRUMB -->
			</div>
		</div>
		<!-- end: PAGE HEADER -->

		<h:form id="form">
			<div class="row">
			<div class="col-sm-3">
			<label >Sala de Reunião:</label><br />
			<h:selectOneMenu styleClass="btn btn-default" id="sala" value="#{reservaController.idSalaReuniao}" required="true" requiredMessage="Escolha uma Sala" >
				<f:selectItem itemLabel=""/>
		      	<f:selectItems value="#{reservaController.listaSalasReuniao}" var="sala" itemLabel="#{sala.nome}" itemValue="#{sala.idSalaReuniao}"/>
		    </h:selectOneMenu>
		    </div>
		   </div>
			<br />
			<div class="row">
			<div class="col-sm-3">
			<label >Funcionario:</label><br />
			<h:selectOneMenu styleClass="btn btn-default" id="funcionario" value="#{reservaController.idFuncionarioSelecionado}" required="true" requiredMessage="Escolha um Funcionário" >
				<f:selectItem itemLabel=""/>
		      	<f:selectItems value="#{reservaController.listaFuncionarios}" var="funcionario" itemLabel="#{funcionario.nome}" itemValue="#{funcionario.idFuncionario}"/>
		    </h:selectOneMenu>
		    </div>
		   </div>
		   <br/>
			<h:outputText value="Data:" />
			<br />
			<p:calendar value="#{reservaController.reserva.dataReuniao}"/>
			<br />	
			<br/>
			<h:outputText value="Hora de Início:" />
			<br />
			<h:inputText value="#{reservaController.reserva.horaInicio}" />
			<br />
			<br/>
			<h:outputText value="Hora de Fim:" />
			<br />
			<h:inputText value="#{reservaController.reserva.horaFim}" />
			<br />
			<br />
			<h:commandButton id="salvar" value="Salvar"
				action="#{reservaController.salvar}" />
		</h:form>

	</ui:define>

</ui:composition>

</html>
